﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vParameter
	/// </summary>
	[Serializable]
	public class vParameter : Entity 
	{ 
		 public vParameter() 
            : base("vParameter") 
        { 

        }


		#region Model
		private int _UID;
		private string _Name;
		private string _Note;
		private string _Type;
		private int? _IntValue;
		private string _CurrValue;
		private bool? _BoolValue;
		private string _StrValue;
		private DateTime? _DateValue;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
		private string _UserCreate;
		private string _UserModify;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Name
		{
			get{ return _Name; }
			set
			{
				this.OnPropertyValueChange(_.Name,_Name,value);
				this._Name = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Type
		{
			get{ return _Type; }
			set
			{
				this.OnPropertyValueChange(_.Type,_Type,value);
				this._Type = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? IntValue
		{
			get{ return _IntValue; }
			set
			{
				this.OnPropertyValueChange(_.IntValue,_IntValue,value);
				this._IntValue = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CurrValue
		{
			get{ return _CurrValue; }
			set
			{
				this.OnPropertyValueChange(_.CurrValue,_CurrValue,value);
				this._CurrValue = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? BoolValue
		{
			get{ return _BoolValue; }
			set
			{
				this.OnPropertyValueChange(_.BoolValue,_BoolValue,value);
				this._BoolValue = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string StrValue
		{
			get{ return _StrValue; }
			set
			{
				this.OnPropertyValueChange(_.StrValue,_StrValue,value);
				this._StrValue = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public DateTime? DateValue
		{
			get{ return _DateValue; }
			set
			{
				this.OnPropertyValueChange(_.DateValue,_DateValue,value);
				this._DateValue = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCreate
		{
			get{ return _UserCreate; }
			set
			{
				this.OnPropertyValueChange(_.UserCreate,_UserCreate,value);
				this._UserCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserModify
		{
			get{ return _UserModify; }
			set
			{
				this.OnPropertyValueChange(_.UserModify,_UserModify,value);
				this._UserModify = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Name,
				_.Note,
				_.Type,
				_.IntValue,
				_.CurrValue,
				_.BoolValue,
				_.StrValue,
				_.DateValue,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate,
				_.UserCreate,
				_.UserModify
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Name,
				_Note,
				_Type,
				_IntValue,
				_CurrValue,
				_BoolValue,
				_StrValue,
				_DateValue,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate,
				_UserCreate,
				_UserModify
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Name":
                    this._Name = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Type":
                    this._Type = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IntValue":
                    this._IntValue = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CurrValue":
                    this._CurrValue = DataHelper.ConvertValue<string>(value);
                    break; 
				case "BoolValue":
                    this._BoolValue = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "StrValue":
                    this._StrValue = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DateValue":
                    this._DateValue = DataHelper.ConvertValue<DateTime?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCreate":
                    this._UserCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModify":
                    this._UserModify = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Name":
                    return this._Name; 
				case "Note":
                    return this._Note; 
				case "Type":
                    return this._Type; 
				case "IntValue":
                    return this._IntValue; 
				case "CurrValue":
                    return this._CurrValue; 
				case "BoolValue":
                    return this._BoolValue; 
				case "StrValue":
                    return this._StrValue; 
				case "DateValue":
                    return this._DateValue; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				case "UserCreate":
                    return this._UserCreate; 
				case "UserModify":
                    return this._UserModify; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vParameter");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vParameter","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Name = new Field("Name","vParameter","Name");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","vParameter","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Type = new Field("Type","vParameter","Type");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IntValue = new Field("IntValue","vParameter","IntValue");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CurrValue = new Field("CurrValue","vParameter","CurrValue");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BoolValue = new Field("BoolValue","vParameter","BoolValue");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field StrValue = new Field("StrValue","vParameter","StrValue");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DateValue = new Field("DateValue","vParameter","DateValue");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vParameter","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vParameter","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vParameter","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vParameter","ModifyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreate = new Field("UserCreate","vParameter","UserCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModify = new Field("UserModify","vParameter","UserModify");
		}
		#endregion

 
	}
}

